// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.linqingying.gitcode.api.data;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Date;

@SuppressWarnings("UnusedDeclaration")
public class GitCodeRepo extends GitCodeRepoBasic {


  private Date createdAt;

  private Date updatedAt;

  private GitCodeNamespace namespace;

  private Date pushedAt;


  private String homepage;

  private Integer size;

  private Integer stargazersCount;
  private Integer watchersCount;

  private String language;






  private String mirrorUrl;
  private Boolean archived;

  private Integer openIssuesCount;
  //private ??? license;
  private Integer forks;
  private Integer openIssues;
  private Integer watchers;
  private String defaultBranch;


  @NotNull
  public String getCloneUrl() {
    if(super.getHttpUrlToRepo() != null){
      return super.getHttpUrlToRepo();
    }

    if(super.getSshUrlToRepo() != null){
      return super.getSshUrlToRepo();
    }
// TODO 是不是应该自行拼接一个？
    return "";
  }

  @NotNull
  public GitCodeNamespace getNamespace() {
    return namespace;
  }

  @Nullable
  public String getDefaultBranch() {
    return defaultBranch;
  }

}
